<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>	
	</head>
	<body>
		<canvas id="mycanvas"></canvas>
	</body>
	<script>
			var obj=document.getElementById("mycanvas");
			var context=obj.getContext("2d");
			context.beginPath();
			context.arc(200,80,60,0*Math.PI,2*Math.PI);
			var gradient=context.createLinearGradient(255,0,0,0);
			gradient.addColorStop(1,"red");
			gradient.addColorStop(1,"magenta");
			context.strokeStyle=gradient;
			context.lineWidth=3;//设置或返回当前的线条宽度

			context.stroke();//	绘制已定义的路径

		</script>
</html>